#ifndef DICE_H	
#define DICE_H

#include <QGLWidget>
#include <QObject>

class Dice : public QGLWidget
{
	Q_OBJECT

public:
	Dice(QWidget *parent = 0);

protected:
	void initializeGL();
	void resizeGL(int width, int height);

	void paintGL();	
	void mousePressEvent(QMouseEvent *event);
	void mouseMoveEvent(QMouseEvent *event);

private:
	void draw();
	void initializeFaceColors();
        void posChanged(QPoint pos);
	
	GLfloat rotationX;
	GLfloat rotationY;
	GLfloat rotationZ;

	QColor faceColors[6];
	QPoint lastPos;

 private slots:
    void tuioCursor(int ,double , double, int);
};

#endif
